cmake_minimum_required(VERSION 3.14)
project(jaxCode2024)

# 设置C++标准
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_C_STANDARD 11)

# 设置编译器
set(CMAKE_C_COMPILER "gcc")
set(CMAKE_CXX_COMPILER "g++")

include_directories(
    # ${CMAKE_CURRENT_SOURCE_DIR}/include
    ${CMAKE_CURRENT_SOURCE_DIR}/IPC/inc
)

add_executable(server IPC/testcpp.cpp)

add_executable(client IPC/testc.c)

# 为C++文件添加编译选项
target_compile_options(server PRIVATE -Wall -Wextra -Werror -pedantic -std=c++17 -g)
# 为C文件添加编译选项
target_compile_options(client PRIVATE -Wall -Wextra -Werror -pedantic -std=c11 -g)
# 安装目标
install(TARGETS server DESTINATION bin)
install(TARGETS client DESTINATION bin)